package org.goyo.main.domain.entity.sale;
import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.goyo.main.domain.entity.BaseEntryObject;
import org.goyo.main.domain.entity.base.Material;

/**
 * 途损
 * @author Administrator
 *
 */
@Entity
public class Loss extends BaseEntryObject implements Serializable {
	
	private static final long serialVersionUID = 1L;
	//商品  、处理方式、途损数量 途损金额 
	/**
	 * 商品
	 */
	@ManyToOne
	@JoinColumn(name="materialId")
	private Material material;
	/**
	 * 商品名称
	 */
	@Column
	private String materialName;
	
	/**
	 * 处理方式
	 */
	@Column
	private String processMode;
	
	/**
	 * 途损数量
	 */
	@Column
	private double lossQty = 0;
	
	/**
	 * 途损金额
	 */
	@Column
	private BigDecimal lossAmount = BigDecimal.ZERO;
	
	/**
	 * 来源单据Id
	 */
	@Column
	private String resourceId;
	
	/**
	 * 来源单据分录Id
	 */
	@Column
	private String resourceEntryId;
	
	public Material getMaterial() {
		return material;
	}

	public void setMaterial(Material material) {
		this.material = material;
	}

	public String getProcessMode() {
		return processMode;
	}

	public void setProcessMode(String processMode) {
		this.processMode = processMode;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getResourceId() {
		return resourceId;
	}

	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}

	public String getResourceEntryId() {
		return resourceEntryId;
	}

	public void setResourceEntryId(String resourceEntryId) {
		this.resourceEntryId = resourceEntryId;
	}

	public String getMaterialName() {
		return materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}

	public double getLossQty() {
		return lossQty;
	}

	public void setLossQty(double lossQty) {
		this.lossQty = lossQty;
	}

	public BigDecimal getLossAmount() {
		return lossAmount;
	}

	public void setLossAmount(BigDecimal lossAmount) {
		this.lossAmount = lossAmount;
	}
	
	
	
}
